<template>
  <div>
    <div class="component-mainHeader">
      <div class="top">
        <div class="topleft">
          <p>
            <span class="iconfont" style="color:#1abc9a;margin-right:3px;">&#xe607;</span>跳纤站点验收表
          </p>
        </div>
        <div class="topright">
          <el-button type="info" @click="$router.go(-1)">
            <span style="font-weight:700;margin-right:5px;" class="iconfont">&#xe606;</span>返回
          </el-button>
        </div>
      </div>
    </div>
    <div class="component-searchHeader">
      <div class="search-header">
        <div class="left-title">
          <p class="left-text">跳纤站点验收表</p>
          <div class="right"></div>
        </div>
      </div>
    </div>
    <div class="table">
      <el-table
        ref="multipleTable"
        :data="info"
        tooltip-effect="dark"
        style="width:100%"
        border
      >
        <el-table-column label="序号" align="center" width="50" type="col_1"></el-table-column>
        <el-table-column label="站点信息" align="center">
          <el-table-column label="项目" align="center" prop="col_2"></el-table-column>
          <el-table-column label="镇区" align="center" prop="col_3"></el-table-column>
          <el-table-column label="环路名称" align="center" prop="col_4"></el-table-column>
          <el-table-column label="验收站点名称" align="center" prop="col_5"></el-table-column>
          <el-table-column label="站点属性" align="center" prop="col_6"></el-table-column>
        </el-table-column>
        <el-table-column label="现场验收" align="center">
          <el-table-column label="验收批次" align="center" prop="col_7"></el-table-column>
          <el-table-column label="集成单位" align="center" prop="col_8"></el-table-column>
          <el-table-column label="监理单位" align="center" prop="col_9"></el-table-column>
        </el-table-column>
      </el-table>
    </div>
    <!-- 分页 -->
    <div class="component-paging" v-if="info.length > 0">
      <div class="table-bottom">
        <div class="bottom-left" style="margin-left: 42px;"></div>
        <div class="paging">
          <div class="paging-left">
            <p>
              共
              <span>{{Math.ceil(total/pageSize)}}</span> 页/
              <span>{{total}}</span> 条数据
            </p>
          </div>
          <el-pagination
            background
            @size-change="SizeChange($event,dataInit,currentPage,pageSize)"
            @current-change="CurrentChange($event,dataInit,currentPage,pageSize)"
            :current-page="currentPage"
            :page-sizes="[10, 20, 30]"
            :page-size="pageSize"
            layout="sizes, prev, pager, next, jumper"
            :total="total"
          ></el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        info:[],
        // 数据总条数
        total: 1,
        // 每页显示数据的条数
        pageSize: 10,
        // 当前显示的页面页码
        currentPage: 1,
      };
    },
    created(){

    },
    mounted(){
     console.log(this.$route.query.batchId)
     this.dataInit();
    },
    methods: {
      dataInit(){
        let that = this,
          suCb = function (res) {
            console.log(res)
            that.info = res.data.data.data
            that.total = res.data.data.rowCount
          },
          erCb = function (res) {
            console.log(res)
          },
          palyParam = {
            url: "/api/web/proBatchDoc/getBatchDispatch",
            methods: 'post',
            data: {
            batchId:that.$route.query.batchId,
            attachment: "3",
            pageSize:that.pageSize,
            pageCurrent:that.currentPage
          },
            success: suCb,
            error: erCb,
          }
        that.$https(palyParam)
      },
    },
    watch: {}

  };
</script>
<style scoped>
  .component-mainHeader .top .topright {
    font-size: 24px;
  }

  .component-searchHeader .search-header {
    width: 1100px;
    box-sizing: border-box;
    border: 1px solid rgba(228, 228, 228, 1);
    background-color: rgba(255, 255, 255, 1);
    margin: 20px auto 0;
  }

  .component-searchHeader .search-header .left-title {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background-color: rgba(243, 243, 243, 1);
    height: 45px;
    box-sizing: border-box;
  }

  .component-searchHeader .search-header .left-title .left-text {
    width: 20%;
    color: #666;
    font-family: "微软雅黑";
    font-weight: 400;
    font-size: 12px;
    line-height: 45px;
    text-align: left;
    margin: 0 0 0 30px;
  }
  .table{
    width: 1100px;
    margin: 0px auto;
    border-top:none;
  }
</style>
